/*设置变量*/
:root{
    --bg-color: #b7d4a8;
}
body{
    margin: 0;
    padding: 0;
    font: bold 20px 'Courier';
}
*{
    box-sizing: border-box;
}

#main{
    width: 360px;
    height: 420px;
    background: var(--bg-color);
    margin: 100px auto;
    border: 10px solid #000;
    border-radius: 10px;
    display: flex;
    flex-flow: column;
    justify-content: space-around;
    align-items: center;
}

#stage{
    width: 304px;
    height: 304px;
    border: 2px solid #000;
    position: relative;
}

#snake{

}
#snake div{
    width: 10px;
    height: 10px;
    background: #000;
    border-radius: 3px;
    border: 1px solid var(--bg-color);
    position: absolute;
}
#snake div:nth-child(1)::after {
    content: '';
    display: inline-block;
    width: 3px;
    height: 3px;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#food{
    width: 10px;
    height: 10px;
    /*background: #fff;*/
    position: absolute;
    top: 30px;
    left: 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-content: space-between;
}
#food div{
    width: 4px;
    height: 4px;
    background: #000;
}

#score_panel{
    width: 300px;
    display: flex;
    justify-content: space-between;
}
